﻿using Net.Server;
using Net.System;

namespace Net.Share
{
    public delegate void OnReceiveDataHandle(IRpcModel model);
    public delegate void OnReceiveDataHandle<Client>(Client client, IRpcModel model);
    public delegate void OnOperationSyncEvent(in OperationList operList);
    public delegate void OnOperationEvent(in Operation opt);

    public delegate bool SerializeRpcDelegate(ISegment segment, IRpcModel model);
    public delegate bool DeserializeRpcDelegate(ISegment segment, IRpcModel model);
    public delegate byte[] SerializeOptDelegate(in OperationList list);
    public delegate void OperationSyncDelegate<Client>(Client client, in OperationList operList);

    public delegate void NetworkDataTraffic(NetworkTrafficStatistics trafficStatistics);

    public delegate void RpcInvokeDelegate(MyDictionary<object, IRpcMethod> rpcDict, ClientPeerBase client, IRpcModel model);
    public delegate void RpcLogDelegate(int code, ClientPeerBase client, IRpcModel model);
}